package com.pswv2.backstage.more.mywallet.imp;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pswv2.backstage.more.mywallet.service.MyWalletService;
import com.pswv2.bub.bsc.dao.po.MyWallet;
import com.pswv2.util.ExtraSpringHibernateTemplate;


@Service
public class MyWalletServiceImpl implements MyWalletService {
	private static Class<?> poc = MyWallet.class;
	@Autowired
	private ExtraSpringHibernateTemplate extraSpringHibernateTemplate;


	@Override
	public MyWallet queryById(Integer id) {
		return extraSpringHibernateTemplate.findFirstOneByPropEq(poc, "myWalletId", id);
	}


	@Override
	public MyWallet queryByUserId(Integer userId) {
		// TODO Auto-generated method stub
		return extraSpringHibernateTemplate.findFirstOneByPropEq(poc, "userId", userId);
	}
}
